package io.gitee.wminyu.day02;

import java.util.Arrays;
import java.util.Scanner;

public class disrupt_the_order {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        int m = input.nextInt();
        int arrays[] = new int [m];
        for (int i=0; i<m; i++){
            arrays[i] = input.nextInt();
        }
        System.out.println(Arrays.toString(arrays));
        shuffle(arrays,m);
    }
    public static void shuffle(int[] numbers,int n){
        int temp1,temp2;
        for (int i=0;i<n; i++){
            temp1 = numbers[i];
            temp2 = (int )(Math.ceil(Math.random()*n-1));
            numbers[i] = numbers[temp2];
            numbers[temp2] = temp1;
            System.out.println("随机数为："+temp2);
            break;
        }
        System.out.println(Arrays.toString(numbers));
    }
}
